import config from "../../config/index.js";
import http from "../../utils/request.js";

export default {
    addDept: {
        url: `${config.API_URL}/platform/dept/add`,
        name: "新增部门",
        post: function (platformDeptAddVo) {
            return http.post(this.url, platformDeptAddVo);
        }
    },
    delDepts: {
        url: `${config.API_URL}/platform/dept/del`,
        name: "多选级联删除部门",
        delete: function (deptIds) {
            return http.delete(this.url, deptIds);
        }
    },
    editDept: {
        url: `${config.API_URL}/platform/dept/edit`,
        name: "修改部门信息",
        put: function (platformDeptEditVo) {
            return http.put(this.url, platformDeptEditVo);
        }
    },
    getDeptById: {
        url: `${config.API_URL}/platform/dept/info`,
        name: "根据ID获取树形部门详情",
        get: function (deptId) {
            return http.get(this.url + "/" + deptId);
        }
    },
    pageListDept: {
        url: `${config.API_URL}/platform/dept/pageList`,
        name: "分页查询树形部门列表",
        get: function (platformDeptQueryVo) {
            return http.get(this.url, platformDeptQueryVo);
        }
    }
}
